<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<span th:text="${name}"></span>
<!--<span th:text="${user}"></span>-->


<span th:utext="${username}"></span>

<h1>展示对象数据</h1>


<ul>
    <li>id:<span th:text="${user.id}"/></li>
    <li>name:<span th:text="${user.name}"/></li>
    <li>age:<span th:text="${user.age}"/></li>
    <li>bir:<span th:text="${#dates.format(user.bir,'yyyy-MM-dd')}"/></li>
</ul>


<h1>展示多个数据(获取遍历状态)</h1>


<ul th:each="user:${users}">
    <li><span th:text="${user.id}"/></li>

    <li><span th:if="${user.age} > 24" th:text="${user.name}"></span></li>
    <li><span th:text="${#dates.format(user.bir,'yyyy年MM月dd日')}"/></li>



</ul>



</body>
</html>